/*
 * @Author: your name
 * @Date: 2022-04-10 17:41:26
 * @LastEditTime: 2022-04-13 20:05:48
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \drivingTow\src\score\dto\create-score.dto.ts
 */
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsNotEmpty, IsNumber } from "class-validator";

export class CreateScoreDto {
  @IsNotEmpty()
  @ApiProperty({ description: '评分分数' })
  readonly score: number;

  @IsNotEmpty()
  @ApiProperty({ description: '教练ID' })
  readonly coach: string;

  @IsNotEmpty()
  @ApiProperty({ description: '评价状态' })
  readonly status: string;

  @IsNotEmpty()
  @ApiProperty({ description: '评价学员' })
  readonly trainee: string;

  @ApiPropertyOptional({ description: '评价内容' })
  readonly content: string;

  @IsNotEmpty()
  @ApiProperty({description:'科目分类'})
  readonly catogary:string;

  @IsNotEmpty()
  @ApiProperty({ description: '建表时间' })
  readonly create_time: string;
  
}
export class ScoreInfoDto {
  public id: number;
  public trainee: string;
  public status: string;
  public coach: string;
  public content: string;
  public catogary: string;
  public score:number;
  public create_time:string;
}

export interface ScoreRo {
  list: ScoreInfoDto[];
  Total: number;
}

export class UpdateScoreDto{
  @IsNotEmpty()
  @ApiProperty({ description: 'ID' })
  readonly id: number;

  @IsNotEmpty()
  @ApiProperty({ description: '分数' })
  readonly score: number;

  @ApiPropertyOptional({ description: '评价内容' })
  readonly content: string;
}

export class AverageDto{
  @IsNotEmpty()
  @ApiProperty({ description: '教练员ID' })
  readonly coach: string;

  @IsNotEmpty()
  @ApiProperty({ description: '分类' })
  readonly catogary: string;
}